package com.yummy.oneself.keysecret.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.yummy.oneself.keysecret.service.SecretService;

@RestController
@RequestMapping("/secret")
public class SecretController {
	
	@Autowired
	private SecretService secretService;

	@GetMapping("/get")
	public String getSecret(String appname){
		return secretService.getSecret(appname);
	}
	
	@GetMapping("/getbyappuser")
	public String getSecretByAppAndUser(String appname,String username){
		return secretService.getSecretByAppAndUser(appname,username);
	}
	
}
